/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package buisness;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author gabrielle
 */
public class Crypt
{

    public static String crypt(String message)
    {
        try 
        {
            MessageDigest digest= MessageDigest.getInstance("MD5");
            String crypt = new String(digest.digest(message.getBytes()));
            return crypt;
        } 
        catch (NoSuchAlgorithmException ex) 
        {
            Logger.getLogger(Crypt.class.getName()).log(Level.SEVERE, null, ex); 
        }
        
        return "";
    }
}
